package com.cristina.attention.service;

import com.cristina.attention.entity.Group;
import com.cristina.attention.entity.GroupMember;
import com.cristina.attention.mapper.GroupMemberMapper;
import com.cristina.attention.mp.base.BaseServiceImpl;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

/**
 * @author by Attention
 * @Classname GroupMemberService
 * @Date 2021/12/6
 */
@Service
@Slf4j
@AllArgsConstructor
public class GroupMemberServiceImpl extends BaseServiceImpl<GroupMemberMapper, GroupMember> implements GroupMemberService {

    private final GroupMemberMapper groupMemberMapper;
    @Override
    public List<Group> findGroupBelonging(Long userId) {
        return null;
    }

    @Override
    public List<GroupMember> findGroupMemberByGroupId(Long groupId, Long userId) {
        return groupMemberMapper.findGroupMemberExcludeUserId(groupId, userId);
    }

    @Override
    public List<GroupMember> findGroupMemberByGroupId(Set<Long> groupId) {
        return groupMemberMapper.findGroupMemberByGroupId(groupId);
    }
}
